<template>
  <div class="mb-4">    
    <el-button type="success" @click="login">登录</el-button>    
  </div>
  <formForm/>
  <button @click="login"> 登录</button>
</template>
<script scoped> 

import {WeatherForecast} from '../api/api1';
import formForm from "../views/From/formF.vue"
export default {  
  components: {
    formForm
  },
  name: 'LoginComponent',  
  methods: {  
    login(){     
        WeatherForecast().then(res=> {
        alert(res.data);
      })
    }
  }  
}  
</script>  